package Text2;

import java.util.*;

public class Main {
    static int[] cnt = new int[26];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s=in.next();
        int max=0;
        for (int i = 0; i < s.length(); i++) {
            cnt[s.charAt(i)-'A']++;
            max=Math.max(max,cnt[s.charAt(i)-'A']);
        }
        for (int i = 0; i < 26; i++) {
           if(cnt[i]==max){
               System.out.printf("%c",'A'+i);
           }
        }
    }
}
